<template>
  <div class="bg">
    <!-- 顶部标题 -->
    <div class="top">
      <p class="top-text">商户资料</p>
    </div>
    <!-- 主体内容 -->
    <div class="nav">
      <div class="list">
        <el-input placeholder="暂无" readonly v-model="content.name">
          <template slot="prepend">商户名称:</template>
        </el-input>
      </div>
      <div class="list">
        <el-input placeholder="暂无" readonly v-model="content.balance">
          <template slot="prepend">&emsp;商户号:</template>
        </el-input>
      </div>

      <div class="textarea">
        <span class="input-textarea">MD5 Secret:</span>
        <el-input
          placeholder="暂无"
          type="textarea"
          :rows="2"
          v-model="content.md5"
          readonly
          resize="none"
          class="input"
        >
        </el-input>
      </div>
      <div class="list">
        <el-input placeholder="暂无" readonly v-model="content.tel">
          <template slot="prepend">商户余额:</template>
        </el-input>
      </div>

      <div class="nav-switch">
        <span class="nav-text">自动审核: </span>
        <el-tooltip
          class="search-button"
          effect="dark"
          content="开启后无需商户审核，自动发送到卡商后台进行处理。"
          placement="bottom"
        >
          <el-switch
            v-model="value"
            active-color="#13ce66"
            inactive-color="#ff4949"
            active-text="开"
            inactive-text="关"
          >
          </el-switch>
        </el-tooltip>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: true,
      id: 1,
      content: {
        name: "",
        tel: "",
        md5: "0x4e0811a10xf7537e820xbd3af2350x2ad7d2bb0xeb86d391",
        balance: "",
        examine: true,
      },
    };
  },
  methods: {},
  mounted() {

    this.$axios({
      url: "/system/user/mm/merchantinformation/queryMerchantsInformation",
      method: "GET",
    })
      .then((response) => {
        console.log('信息',response.data.data);
        this.content.name = response.data.data.merchant_name;
        this.content.balance = response.data.data.id;
        this.content.tel = response.data.data.md5_secret;
        this.content.tel = response.data.data.merchant_total_balance;
        if (response.data.data.automatic_audit === 1) {
          this.value = true;
        } else {
          this.value = false;
        }
      })
      .catch((error) => {
        console.log('信息',error);
      });




  },
};
</script>
<style lang="scss" scoped>
template {
  padding: 15px;
  .el-input-group__prepend {
    color: black;
  }
}
// 顶部标题
.bg {
  background-color: white;
}
.top {
  padding: 15px 0;
  border-bottom: 2px solid #f6f6f6;
}
.top-text {
  font-size: 14px;
  padding: 0 15px;
}
// 主体内容
.nav {
  margin: 50px auto 0 auto;
  width: 400px;
}
.list {
  margin: 20px 0;
}
.nav-text {
  width: 93.25px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  display: inline-block;
  margin-right: 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background-color: #f5f7fa;
  color: black;
}
.input {
  width: 306.75px;
  position: absolute;
  color: #606266;
  top: 0;
  right: 0;
  font-size: 14px;
}
.textarea {
  position: relative;
  height: 40px;
  margin: 20px 0 34px 0;
}
.input-textarea {
  box-sizing: border-box;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background-color: #f5f7fa;
  color: black;
  height: 40px;
  width: 94.25px;
  line-height: 40px;
  position: absolute;
  top: 9px;
  left: 0;
  font-size: 13.5px;
}
.nav-switch {
  margin: 20px 0;
  padding-bottom: 50px;
  span {
    font-size: 14px;
  }
}
</style>

<style lang="scss">
.el-input-group__append,
.el-input-group__prepend {
  color: black;
}
</style>